package com.innovation.chengzhangriji.http;

import com.google.gson.annotations.SerializedName;
import com.innovation.library.http.InnovationRequestBody;

public class PushTokenRequest extends BaseTokenRequest {

    public static final String PATH = BaseRequest.PATH + "api/Bind_DeviceInfo";

    private String deviceId;

    private String appId;

    private String pushToken;

    public String getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(String deviceId) {
        this.deviceId = deviceId;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getPushToken() {
        return pushToken;
    }

    public void setPushToken(String pushToken) {
        this.pushToken = pushToken;
    }

    @Override
    protected InnovationRequestBody getInnovationRequestBody() {
        PushTokenRequestBody body = new PushTokenRequestBody();
        body.setPhone(getPhone());
        body.setToken(getToken());
        body.setDeviceId(getDeviceId());
        body.setAppId(getAppId());
        body.setPushToken(getPushToken());
        return body;
    }

    private class PushTokenRequestBody extends BaseTokenRequestBody {

        @SerializedName("DeviceID")
        private String deviceId;

        @SerializedName("AppGUID")
        private String appId;

        @SerializedName("Token")
        private String pushToken;

        private PushTokenRequestBody() {
            setSv(BaseRequestConfig.SV_PUSH_TOKEN);
        }

        public String getDeviceId() {
            return deviceId;
        }

        public void setDeviceId(String deviceId) {
            this.deviceId = deviceId;
        }

        public String getAppId() {
            return appId;
        }

        public void setAppId(String appId) {
            this.appId = appId;
        }

        public String getPushToken() {
            return pushToken;
        }

        public void setPushToken(String pushToken) {
            this.pushToken = pushToken;
        }
    }
}
